package video.dataAndType

val intArray: IntArray = intArrayOf(1, 2, 3)
val charArray: CharArray = charArrayOf('H', 'E', 'L', 'L', 'O')
val stringArray: Array<String> = arrayOf("我", "是", "码农")


fun main(args: Array<String>) {
    intArray.size.also { println(it) }

    //字符数组拼接,joinToString默认,分割
    charArray.joinToString("").also { println(it) }

    stringArray[1] = "不是"
    println(stringArray.joinToString(""))

    //截取数组元素
    println(intArray.slice(1..2))

}